package com.ruoyi.project.user.ipdistribute.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.user.ipdistribute.mapper.IpDistributeMapper;
import com.ruoyi.project.user.ipdistribute.domain.IpDistribute;
import com.ruoyi.project.user.ipdistribute.service.IIpDistributeService;
import com.ruoyi.common.utils.text.Convert;

/**
 * ip分布Service业务层处理
 * 
 * @author shixiangwen
 * @date 2020-03-12
 */
@Service
public class IpDistributeServiceImpl implements IIpDistributeService 
{
    @Autowired
    private IpDistributeMapper ipDistributeMapper;

    /**
     * 查询ip分布
     * 
     * @param id ip分布ID
     * @return ip分布
     */
    @Override
    public IpDistribute selectIpDistributeById(Long id)
    {
        return ipDistributeMapper.selectIpDistributeById(id);
    }

    /**
     * 查询ip分布列表
     * 
     * @param ipDistribute ip分布
     * @return ip分布
     */
    @Override
    public List<IpDistribute> selectIpDistributeList(IpDistribute ipDistribute)
    {
        return ipDistributeMapper.selectIpDistributeList(ipDistribute);
    }

    /**
     * 新增ip分布
     * 
     * @param ipDistribute ip分布
     * @return 结果
     */
    @Override
    public int insertIpDistribute(IpDistribute ipDistribute)
    {
        return ipDistributeMapper.insertIpDistribute(ipDistribute);
    }

    /**
     * 修改ip分布
     * 
     * @param ipDistribute ip分布
     * @return 结果
     */
    @Override
    public int updateIpDistribute(IpDistribute ipDistribute)
    {
        return ipDistributeMapper.updateIpDistribute(ipDistribute);
    }

    /**
     * 删除ip分布对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteIpDistributeByIds(String ids)
    {
        return ipDistributeMapper.deleteIpDistributeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除ip分布信息
     * 
     * @param id ip分布ID
     * @return 结果
     */
    @Override
    public int deleteIpDistributeById(Long id)
    {
        return ipDistributeMapper.deleteIpDistributeById(id);
    }
}
